<?php

// Define path to resources directory
defined('RESOURCES_PATH') || define('RESOURCES_PATH', realpath(ROOT_PATH . '/resources'));
//当前时间
defined('NOW_TIME') || define('NOW_TIME', $_SERVER ['REQUEST_TIME'] ? $_SERVER ['REQUEST_TIME'] : time());
//是否Ajax传递
defined('XML_R') || define('XML_R', !empty($_SERVER['HTTP_X_REQUESTED_WITH']) || !empty($_REQUEST['ajax']));
//host
defined('HTTP_HOST') || define('HTTP_HOST', $_SERVER['HTTP_HOST']);
//域
defined('WEB_DOMAIN') || define('WEB_DOMAIN', preg_replace('/^(attach|crm|api)\./si', '', $_SERVER['SERVER_NAME']));
//网站路径
defined('WEB_URL') || define('WEB_URL', 'http://' . WEB_DOMAIN);
//网站样式路径
defined('BASE_STYLE') || define('BASE_STYLE', \config\ConfigLocal::getLocalConfog()->base_style);
//用户IP
defined('C_IP') || define('C_IP', Client::GetIp());
defined('IS_ZIP') || define('IS_ZIP', TRUE);
//分页默认条数
defined('PAGE_SIZE') || define('PAGE_SIZE', 20);
defined('DEFAULT_AVATAR') || define('DEFAULT_AVATAR', BASE_STYLE.\config\ConfigLocal::getLocalConfog()->define['DEFAULT_AVATAR']);
defined('BASE_ATTACH') || define('BASE_ATTACH', \config\ConfigLocal::getLocalConfog()->define['BASE_ATTACH']);
defined('OLD_SITE_URL') || define('OLD_SITE_URL', \config\ConfigLocal::getLocalConfog()->define['OLD_SITE_URL']);